package jonggyuni.basic;

import java.util.Scanner;

public class NumberPiramid {

	public static void main(String[] args) {

		int i,j;
		
		int n,tmp, m;
		
		Scanner sc = new Scanner(System.in);
		
		System.out.print("Enter the number of line: ");

		i=sc.nextInt();
		tmp=i;
		j=1;
		n=1;
		m=1;
		while(j<=tmp){
			while(i>=1){//i=4
				if(i>j)
					System.out.print(" ");
				else
					System.out.print(i);
				--i;
			}
			while(n<=j){
				while(m<n){
					System.out.print(m+1);
					++m;
				}
				n++;
				m=1;
			}
				
			System.out.println("");
			i=tmp;
			++j;
		}

		sc.close();
		
	}

}
